<?php
error_reporting(E_ALL);
ini_set('display_errors', '1');
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<title>Lab2</title>
		<meta http-equiv="content-type" content="text/html; charset=utf-8" />
	</head>
	<body>
		<p>
			<?php
			$test;
			if(isset($test)) {
				echo "set";
			} else {
				echo "not set";
			}
			$test = "blablabla";
			if(isset($test)) {
				echo "set";
			} else {
				echo "not set";
			}
			?><br /><?php
			$s = ' sträng';
			print('enkelfnuttar $s');
			?><br /><?php
			print("dubbelfnuttad $s");
			?>
			<br />
			<?php
			$subject = "abcdef1213";
			$pattern = '/^a-b/';
			$test = preg_match($pattern, $subject);
			print($test);
			
			if(preg_match('/^[0-9]{6}$/', 789678)){
				echo "rätt";
			}
			else{
				echo "fel";
			}
			?>
		</p>
	</body>
</html>